package cn.itsource.myinterface;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

@Target( ElementType.FIELD)
 @Retention(RetentionPolicy.RUNTIME)
 @Documented
 @Constraint(validatedBy = PhoneValidator.class)////此处指定了注解的实现类为ListNotHasNullValidatorImpl
 
 public @interface Phone {
 
 
     String message() default "无效的手机格式";
 
     Class<?>[] groups() default {};
 
     Class<? extends Payload>[] payload() default {};
 }